package cn.bytecollege.admin.service;

import cn.bytecollege.admin.dao.AdminDao;
import cn.bytecollege.common.entity.Admin;

public class AdminService extends AdminDao {
    private AdminDao adminDao = null;

    public AdminService() {
        adminDao = new AdminDao();
    }
    /**
     * 根据管理员账号查询管理员信息
     * @author zsm
     * @param adminUsername
     * @return
     */
    public Admin findAdminByAdminId(String adminUsername){
        return adminDao.findAdminByAdminId(adminUsername);
    }
    /**
     * 保存管理员信息
     * @author zsm
     * @param admin
     * @return
     */
    public int saveAdmin(Admin admin){
        return adminDao.saveAdmin(admin);
    }
    /**
     * 修改管理员的营业额
     * @param turnover
     * @param adminId
     * @return
     */
    public  int saveTurnover(Double turnover,Integer adminId){
        return adminDao.saveTurnover(turnover,adminId);
    }
}
